An improved manta ray foraging optimization algorithm

The Manta Ray Foraging Optimization Algorithm (MRFO) is a metaheuristic algorithm for solving real-world problems. However, MRFO suffers from slow convergence precision and is easily trapped in a local optimal. Hence, to overcome these deficiencies, this paper proposes an Improved MRFO algorithm (IMRFO) that employs Tent chaotic mapping, the bidirectional search strategy, and the Levy flight strategy. Among these strategies, Tent chaotic mapping distributes the manta ray more uniformly and improves the quality of the initial solution, while the bidirectional search strategy expands the search area. The Levy flight strategy strengthens the algorithm’s ability to escape from local optimal. To verify IMRFO’s performance, the algorithm is compared with 10 other algorithms on 23 benchmark functions, the CEC2017 and CEC2022 benchmark suites, and five engineering problems, with statistical analysis illustrating the superiority and significance of the difference between IMRFO and other algorithms. The results indicate that the IMRFO outperforms the competitor optimization algorithms.

a manta ray, and Fig. 1b illustrates its body structure.In nature, manta rays have three main parts during their foraging process.Firstly, the mantas line up, forming an orderly chain.The smaller male rests on the back of the female and moves in tandem with the beat of her pectoral fins.Thus, this mechanism allows them to maximize their foraging efficiency.Secondly, manta rays cluster as cyclones to filter the prey layer when plankton concentrations are high.Finally, somersault foraging is conducted if the densest food spot is found.Because the somersault phase coexists with randomness and periodicity, it helps the mantas control their food intake.MRFO has certain advantages, such as fast convergence speed and a strong ability to search for global optimal, which is widely used in various fields, such as economic load dispatching problems 28 , image segmentation problems 29 , minimization of energy consumption 30 , and radial distribution networks 31 .Although compared to other algorithms, MRFO shows good performance, defects emerge due to the lack of disturbance in the exploration and exploitation phase, such as low solving precision and easily trapped into local optimal.
Spurred by the above deficiencies, this paper extends the MRFO by incorporating Tent chaotic mapping, bidirectional search, and the Levy flight strategy.The bidirectional search strategy aims to start the search from the starting point and select one node from both directions for expansion at a time.This strategy reduces the search space searching from both directions simultaneously and finds a solution faster.It has been employed in algorithm improvement 32 , tourism demand forecasting 33 , and Model for Web Crawling 34 .However, it has never been used in the MRFO algorithm.In the IMRFO algorithm, the bidirectional search strategy not only searches along the direction of the fitness value decrease but also in the opposite direction.In the algorithm-solving process, especially in some multimodal and composite functions, the improving strategy can prevent the algorithm from being trapped into the local optimal and enhance global search ability.Moreover, we introduce the Levy flight strategy into MRFO to help the algorithm jump out from local optimal during exploitation.
The contributions of this paper are as follows.
(1) During the algorithm's initialization phase, Tent chaos mapping provides the initial solution with better ergodicity, uniformity, and randomness in the search space.(2) After the cyclone foraging phase, the bidirectional search strategy helps the algorithm search bidirectionally, which can enlarge the search scope and help the manta ray jump out of local optimal.(3) During the somersault foraging stage, the Levy flight strategy strengthens the algorithm's ability to escape from local optimal.(4) The proposed algorithm is evaluated on 23 benchmark functions, the CEC2017 and CEC2022 benchmark suites, and five engineering problems.(5) Various evaluation measurements illustrate the superiority of our proposed IMRFO.
The remainder of this paper is organized as follows."MRFO algorithm" section briefly presents MRFO."Improved strategy for MRFO" section introduces three improvement strategies and the proposed IMRFO."Experimental results and discussion" section presents the experimental results on 23 benchmark functions and the CEC2017 and CEC2022 benchmark suites."IMRFO for engineering problems" section solves the engineering problems, and "Conclusion" section concludes this work.

MRFO algorithm
The manta ray's chain, cyclone, and somersault foraging process are related to the three stages of the manta ray foraging algorithm.

Chain foraging
During the manta rays' chain foraging, they line up to form an orderly chain, and the mathematical model is: www.nature.com/scientificreports/where r ∈ (0, 1) is a random number, x d i (t) is the current position of the d − th dimension of the i − th individual, and x d best (t) is the best position at tth iteration of the current dth dimension, i.e., the position with the highest concentration of plankton.The update of the current manta ray individual position x d i (t) is determined by the current optimal individual position x d best (t) and the previous individual position x d i−1 (t) , α is the weight coef- ficient, and N is the population size.Figure 2 illustrates the chain foraging behavior sectional drawing.

Cyclone foraging
In the cyclone foraging phase, the plankton concentration is high, and individual manta rays follow the previous individual and move along the cyclone path toward food.This is mathematically modeled as follows: where r ∈ rand(0, 1) , β is the inertia weight, r 1 ∈ [0, 1] is the uniformly distributed random number, t and T are the current and maximum number of iterations, respectively.When t T ≺ r , in order to ensure the diversity of individuals, all individuals randomly assign a new position as their reference position in the whole search space, formulated as follows: where x d rand (t) is the random location of random production, L d b and U d b are the lower and upper bounds of the search space, respectively.A sectional drawing of the cyclone foraging behavior is presented in Fig. 3.

Somersault foraging
When the manta rays find the densest spot of food, they start to forage, forming a somersault, and the mathematical model is as follows: where s is the somersault factor, representing the manta ray somersault intensity.Generally, s = 2 35 , and r 2 , r 3 ∈ (0, 1) is a random number.Figure 4 depicts the somersault foraging behavior sectional drawing.The MRFO pseudo code of the model above is presented in MRFO pseudo code.

Improved strategy for MRFO Tent mapping
For strong randomness and ergodicity, chaos theory has been widely applied in the optimization process of various algorithms 36 , as it can increase the search space compared with random theory.Tent Chaos mapping 37 is a chaotic mathematical model with uniform ergodicity, making the population more uniform and improving the initial solution's quality.It is mathematically expressed as follows: The Tent map is in a chaotic state in the range of (0, 1) , but for µ = 0.5 it is a periodic distribution.To ensure the randomness and ergodicity of the Tent map, µ = 0.5 is taken.Figure 5 presents the distribution of Tent Map- ping for µ = 0.509 .In this paper, the steps of initialization of manta rays by Tent chaotic mapping are as follows: • Step 1 Set the manta ray population of N , dimension D , and maximum iterations of k , randomly generate the initial population value x(i, j) , generate µ(j) ∈ rand(0, 1) , and µ = 0.5 .The initial value of i, j, k is 1. • Step 2 Iterate according to formula (9), j → j + 1 , k → k + 1 , and generate the x k,j sequence.The initial population x i,j sequence is generated by iterating i → i + 1 according to Eq. ( 8).• Step 3 Determine the maximum number of iterations.If k is reached, output the x sequence.Otherwise, return to Step 2 and continue the iteration. (8) x i,j = x min,j + x k,j × (x max,j − x min,j )

The bidirectional search strategy
We employ the bidirectional search strategy 38 to enlarge the search scope and prevent the algorithm from searching along a fixed direction.This strategy is presented in Fig. 6 and is formulated as follows: where x d best and x d worst are the current optimal solution and the worst solution respectively.In the IMRFO algorithm, after the end of the chain foraging stage, the fitness value of the t − th iteration is f x d i (t) , the fitness value of the (t + 1) th iteration is f x d i (t + 1) , and the optimal solution is f min = f (x d best ) .If a bidirectional search strategy is not employed when f x d i (t) > f x d i (t + 1) , the search will be conducted along the Search Direction (the direction of the arrows in Fig. 6a).In this case, the algorithm will find the local optimal solution in the (t + 1) th iteration while adding the bidirectional search strategy.Additionally, the algorithm will search along the bidirectional directions, jump out the local optimal solution, and find the optimal solution f (x d best ) in Fig. 6b.Thus, the bidirectional search strategy could expand the search scope effectively. (10)

Levy flight strategy
The Levy Flight is related to chaos theory 39 and has a wide range of applications in the measurement and simulation of random and pseudo-random natural phenomena 40 .The Levy flight is a random walking process whose action trajectory is a combination of size and size steps, which is essentially a non-Gaussian random process.In the somersault foraging stage of the IMRFO algorithm, the Levy flight is added to renew the population, thereby improving the solution's richness, increasing the search scope, and enhancing the optimization ability.The Levy flight is formulated as follows: where x t i is the position of the t th iteration, ⊕ indicates the point-to-point multiplication, α is the step control parameter, and Levy( ) is the random search path.The following conditions should be met: The random search step size of the Levy Flight is: where s is the flight search step size, β∈ (1, 2] , usually β = 1.5 , and µ, υ follows the normal distribution, with µ ∼ N(0, σ 2 µ ) and υ ∼ N(0, σ 2 υ ) .The IMRFO pseudo code of the model above is presented in IMRFO pseudo code.Figure 7 depicts the path of the Levy flight, and Fig. 8 shows the IMRFO algorithm flowchart.

Exploitation and exploration analysis
The operators α, β, r, s in the original MRFO allow the search agents to update their position based on the loca- tion of x d i (t) and x d i−1 (t) .However, the MRFO easily falls into local solutions.Therefore, we introduced Tent chaos mapping into the algorithm's initialization phase to make the initial solution have better ergodicity, uniformity, and randomness in the search space.Furthermore, the bidirectional search strategy helps the algorithm search bidirectionally and thus enlarges the search scope.The two strategies strengthen IMRFO's exploitation ability when t/T < 0.5 .In IMRFO's somersault foraging stage, the search agents have reached the highest concentra- tion of food, and the Levy flight strategy takes advantage of the randomness of the search step size to escape from the local optimal.Moreover, the location update strategy abs Levy • x d i (t + 1) − x d i (t) enhances IMRFO's exploration ability.
To increase the experiment's credibility, we tested IMRFO and 10 other state-of-the-art algorithms under the same test environment on 23 benchmark functions, the CEC 2017 and CEC 2022 benchmark suites.Additionally, we tested three variants of IMRFO and MRFO on 23 benchmark functions simultaneously to analyze the performance of the IMRFO modifications.During the test process on the 23 benchmark functions, F1-F13 refer to Dim = 30, and F14-F23 are fixed dimensions.For the CEC 2017 and CEC2022 benchmark suites, all functions are Dim = 30, all algorithms run 30 times, and the best (Best), average (Mean), and standard deviation (Std) were recorded, respectively.The best results and standard deviation values are highlighted in bold.
The last three lines in Tables 1, 2, 3, 4 and 5 involve symbol analysis and Friedman mean analysis to obtain meaningful statistical results.When solving the tested function, the analysis of the symbols (W|T|L) represents the algorithms' statistical number with win, tie, and loss.The Friedman mean analysis includes Friedman's mean value and ranking, which indicate the comprehensive ability of all algorithms to solve the test function.

Comparison with Benchmark Functions
Table 1 highlights that the unimodal functions F1-F7 can be used to test the local search ability.The IMRFO algorithm obtained 5 of the best results in F1-F7, and the MRFO algorithm obtained 2, showing obvious advantages over MRFO and the other competitors.The results indicate that the chaotic mapping strategy in the algorithm initialization phase and bidirectional search strategy after the chain foraging phase effectively enhance the global optimization ability of IMRFO.
The F8-F23 functions have many local optimal values, making finding the global optimal more difficult.According to Table 1, IMRFO finds 14 of the best results for the F8-F23 benchmark functions, and MRFO obtains 8, while SMA obtains 7 best results among other competitors and 11 global optimal values.The results indicate a bidirectional search strategy after the chain foraging phase and that the Levy flight in the somersault foraging phase effectively enhances the ability of IMRFO to jump out of a local optimum.
The (W|T|L) result of IMRFO is (20|3|0), and IMRFO achieved the best result.The second best is the SO algorithm, and the third best is MRFO.The IMRFO's Friedman mean value is 1.30, ranking first.The iterative convergence behaviors of all 23 functions are depicted in Fig. 9, which reveals that IMRFO performs well for most functions.
Figure 10 presents the convergence behaviors of 23 benchmark functions to demonstrate the convergence of IMRFO.The first column presents a two-dimensional shape of the benchmark function.The second column presents the convergence curve, which is approximately linear or stepped.The stepped convergence curve proves that it is necessary to jump out of the local optimal to reach the global value in solving some benchmark functions, indicating that the optimal value can be reached without iteration.IMRFO demonstrates convergence.The third column presents the search agent's trajectory in the first dimension.Specifically, the search agent starts fluctuating in the early iteration and ends once it converges and stabilizes during the iterations.This demonstrates that IMRFO performs well.The fourth column shows the changes in average fitness values throughout the iterations, which are unstable and large.The value becomes small and steady for the iteration T = 150 , indicating the quick convergence of IMRFO.In the last column, the red point location is the best solution, and the search agents are gradually approaching it.Figure 10 demonstrates IMRFO's good performance.
Additionally, a box plot analysis scheme is used to analyze the distribution characteristics of the above functions by all 11 algorithms.Figure 11 reveals that IMRFO performs well in most functions compared to the competitor methods.The median, maximum, and minimum values of the objective functions obtained by IMRFO are almost the same as the optimal solutions, especially for functions F3, F9, F10, F11, F14, F15, F16, F17, F18, F19, F20, F21, F22 and F23.      13 reveals that the proposed IMRFO performs well in most functions compared to competitors.The valid values of the objective functions obtained by IMRFO are almost identical to the optimal solutions, especially for functions F2, F3, F4, F11, F14 and F19.

Comparison with CEC 2022 benchmark suite
The results of 11 algorithms on the CEC 2022 benchmark suite are listed in Table 4, indicating that IMRFO achieves the most wins without any losses, obtaining 7 global optimal values for the CEC 2022 benchmark suite.The Friedman mean ranking value is 2.33, ranking first.The iterative convergence curves of the optimization process of all 12 algorithms are depicted in Fig. 14, which shows that IMRFO performs well for most functions.The effectiveness and superiority of our IMRFO are thus confirmed.
Moreover, a box plot analysis is conducted, with the corresponding results illustrated in Fig. 15.The valid values of the objective functions obtained by IMRFO are almost the same as the optimal solutions, especially for functions F1 and F3.

Impact analysis of the modifications
Next, to verify the effectiveness of the proposed strategy in the IMRFO algorithm, we compared IMRFO with MRFO and three other modifications on 23 benchmark functions.Precisely, IMRFO1 (improved algorithm using reverse search strategy and Tent chaos mapping), IMRFO2 (improved algorithm using bidirectional search strategy), IMRFO3 (improved algorithm using bidirectional search strategy and Levy flight strategy), IMRFO (improved algorithm using Tent Chaos mapping, bidirectional search strategy, and Levy flight improvements simultaneously).
According to  www.nature.com/scientificreports/last.To further compare the convergence of various algorithms in the optimization process, we draw the iterative convergence curves of the optimization process of all 23 algorithms, as depicted in Fig. 16, which suggests that IMRFO performs well for most functions among the modifications.

Wilcoxon rank sum test
Wilcoxon's rank sum test evaluates the difference between IMRFO and competitor methods 56 .The significance level value is set at 0.05, and Table 6 reports the significant differences between our proposed IMRFO and the other algorithms in most functions.The results are 116/14/0, 79/20/1, 280/3/7, and 117/1/2.As indicated by all the results, the results of our proposed IMRFO have significant differences compared with the other 10 algorithms.Combined with the above tables and figures, our proposed IMRFO is superior to the competitor algorithms, especially for global optimization problems.

Detailed analysis of the experimental results
Among these experimental results, the unimodal functions of benchmark functions, CEC2017 and CEC2022, can be used to test the local search ability.The IMRFO algorithm obtains the most optimal results, which indicate a chaotic mapping strategy in the algorithm initialization phase and bidirectional search strategy after the chain foraging phase, effectively enhancing the global optimization ability of IMRFO.
Other benchmark functions, CEC2017 and CEC2022, have several local optimal values, making finding the global optimal more difficult.IMRFO finds the most optimal results, which indicate a bidirectional search strategy after the chain foraging phase.Besides, the Levy flight in the somersault foraging phase effectively enhances the ability of IMRFO to jump out local optimal.Tables 1, 2, 3, 4, 5 and 6 illustrate that these three strategies can effectively improve IMRFO's searchability.

IMRFO for engineering problems
This section employs IMRFO to solve 5 engineering problems with 10 mentioned algorithms and other new algorithms.The 5 engineering problems aim to find the minimum objective value under certain restrictions.Each problem is solved by setting T = 500 and the population to N = 50 .Table 7 presents the experimental results of 11 algorithms on engineering problems.IMRFO finds the optimal solution in all five engineering problems.Compared with other algorithms, IMRFO's advantage is very obvious.The iterative convergence curve of IMRFO and the competitors is presented in Fig. 17.

Conclusion
This paper overcomes the defects of MRFO, such as low solving precision and easily trapped into local optimal, by proposing the IMRFO algorithm, which extends MRFO by incorporating Tent Chaos mapping, bidirectional search, and the Levy flight strategy.The Tent chaos mapping strategy in the algorithm's initialization phase helps the manta ray to distribute more uniformly and improve the quality of the initial solution.After the cyclone foraging phase, the bidirectional search strategy into the algorithm helps IMRFO for a bidirectional search, expanding the search area and preventing the algorithm from being trapped in a local optimum.During the somersault foraging stage, the Levy flight strategy uses a random step size, strengthening the algorithm's ability to escape from a local optimum.
To verify IMRFO's performance, it is evaluated on 23 benchmark functions and the CEC2017 and CEC2022 benchmark suites.The corresponding results highlight that IMRFO has high solving precision and a strong ability to avoid the local optimal compared with the competitors.Secondly, we compared IMRFO with MRFO and three IMRFO modifications on 23 benchmark functions to test the effectiveness of the proposed strategies.The results indicate that the three strategies introduced into MFRO simultaneously can improve the algorithm's capability compared to one or two strategies.Thirdly, we use statistical analysis such as Friedman mean ranking and the Wilcoxon rank sum test to increase the credibility of the results.The results further confirm the proposed       IMRFO's superior performance.Moreover, IMRFO and other algorithms are implemented for 5 engineering design problems.The results demonstrate the competitiveness and applicability of IMRFO compared to other advanced algorithms (Supplemenatry material).
Although IMRFO has been proven competitive, it is still underperforming in some areas, specifically in some hybrid function composition functions.Thus, future research will consider adding other strategies to improve the algorithm.Moreover, IMRFO will be used to solve several real-world problems, such as logistics distribution route planning, laser cutting path planning, and 3D printing layout problems.

Table 5 .
The comparison and results on benchmark functions of IMRFO and modifications.The best results and standard deviation values are highlighted in bold.

Figure 14 .
Figure 14.Iterative convergence curve of CEC 2022 benchmark suite of IMRFO and competitors.

Figure 15 .
Figure 15.Box plot analysis for CEC 2022 benchmark suite.

Table 1 .
Experimental results of 11 algorithms on the benchmark functions.The best results and standard deviation values are highlighted in bold.Comparison with enhanced versions of different algorithmsFor better credibility of the proposed IMRFO, we compared the proposed method with enhanced versions of different algorithms on classic benchmark functions.Table2infers that IMRFO has the best performance.Comparison with CEC 2017 benchmark suiteTable3reports the results of 11 algorithms on the CEC 2017 benchmark suite, evaluating further the performance of IMRFO.Specifically, Table2highlights that IMRFO achieves the most wins without any losses, obtaining 15 best results and 20 global optimal values for the F1-F29 CEC 2017 benchmark suite.The Friedman mean ranking value of IMRFO is 1.79, ranking first.Figure12presents the iterative convergence curves of the optimization process of all 29 algorithms, revealing that IMRFO performs well for most functions.The effectiveness and superiority of our IMRFO are thus confirmed.Moreover, a box plot analysis is conducted to study and analyze the distribution characteristics of the CEC 2017 benchmark suite solved by IMRFO and other competitors.Figure Vol:.(1234567890) Scientific Reports | (2024) 14:10301 | https://doi.org/10.1038/s41598-024-59960-1www.nature.com/scientificreports/Continued Vol.:(0123456789) Scientific Reports | (2024) 14:10301 | https://doi.org/10.1038/s41598-024-59960-1www.nature.com/scientificreports/

Table 5 ,
IMRFO finds 20 best results and 21 global optimal values for F1-F23 benchmark functions, MRFO obtains 10 best results and 11 global optimal values, among other modifications, IMRFO1 obtains 11 best results, IMRFO2 obtains 10 best results, and IMRFO3 finds 11 best results and 12 global optimal values.The results reveal that IMRFO using Tent Chaos mapping, bidirectional search strategy, and Levy flight improvements simultaneously have more advantages over MRFO and other modifications, achieving a good balance between search for global optimal and accelerated convergence.According to Table5, the (W|T|L) result of IMRFO is (20|3|1), which is the best result.The Friedman mean ranking value of IMRFO is 1.22, ranking first.The value of IMRFO3 is 2.09, ranking second, the value of IMRFO1 is 2.17, ranking third, and the value of IMRFO2 and MRFO are 2.52 and 2.57, respectively, ranking fourth and

Table 2 .
Results of IMRFO compared with other enhanced algorithms.The best results and standard deviation values are highlighted in bold.

Table 3 .
Experimental results of 11 algorithms on CEC 2017 benchmark suite.The best results and standard deviation values are highlighted in bold.

Table 4 .
Experimental results of 11 algorithms on CEC 2022 benchmark suite.The best results and standard deviation values are highlighted in bold.

Table 7 .
Experimental results of 11 algorithms on engineering problems.Table7presents the experimental results of 11 algorithms on 5 engineering problems.

Table 8 .
The optimal results on TCSD problem.Table8presents the optimal results solved by IMRFO on the TCSD problem compared with 10 new optimization algorithms.

Table 9 .
Optimal results on PVD problem.Table9presents the optimal results solved by IMRFO on the PVD problem compared with 8 new optimization algorithms and MRFO.

Table 10 .
Optimal results on TBTD Problem.Table10presents the optimal results solved by IMRFO on the TBTD problem compared with 8 new optimization algorithms and MRFO.

Table 11 .
Optimal results on WBD problem.Table11presents the optimal results solved by IMRFO on the WBD problem compared with 11 new optimization algorithms.

Table 12 .
Optimal results on GTD Problem.Table12presents the optimal results solved by IMRFO on the GTD problem compared with 8 new optimization algorithms and MRFO.